'use strict'

const fs = require('fs');
const fileName = process.argv[2]
if (!fileName) {
    throw Error('a file to watch must be specified!')
}

fs.watch(fileName, ()=>{console.log(`file ${fileName} changed!`)})
console.log(`now watch ${fileName} for changes`)

